<?php


namespace app\models\order;


use think\Model;

class OrderRecordModel extends Model
{
    protected $name = 'order_record';
    protected $autoWriteTimestamp = true;


    public function getPayTimeAttr($value)
    {
        if (!$value) {
            return 0;
        }
        return date('Y-m-d H:i', $value);
    }

    public function getServiceStartTimeAttr($value)
    {
        if (!$value) {
            return '`1`';
        }
        return date('Y-m-d H:i', $value);
    }
}